<?php

class Social_Controller_Admin_Manage extends Controller
{
	public function indexAction()
	{
		$table = Nuo::getTable('social@service');
		$select = $table -> select();

		$paginator = $this -> paginator = Zend_Paginator::factory($select);

		$paginator -> setCurrentPageNumber($this -> _request -> getParam('page', 1));
	}

	public function editAction()
	{
		$service = $this -> _request -> getParam('service', 'facebook');

		$form = 'social@admin.settings.' . $service;

		$form = $this -> form = Nuo::getForm($form);

		if ($this -> _request -> isPost() && $form -> isValid($this -> _request -> getPost()))
		{
			$form -> doCommit();
		}
	}

}
